home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.43
/
flushcx
/
source
/
flush_4_shell.p
< prev
next >
Wrap
Text File
|
1995-01-07
|
1KB
|
56 lines
{ FlushCX for Shell...
© by J. Stötzer. All rights reserved, look into docu for more info }
Program FlushCX;
uses Exec,ExecSupport;
{$incl "commodities.lib"}
type p_BrokerCopy = ^BrokerCopy;
BrokerCopy = record
bc_Node : Node;
bc_Name : string[CBD_NAMELEN];
bc_Title: string[CBD_TITLELEN];
bc_Descr: string[CBD_DESCRLEN];
bc_Task,bc_Dummy1,bc_Dummy2 : long;
bc_Flags: word;
end;
var BList : p_List;
CNode : p_Node;
HNode : p_BrokerCopy;
ok : long;
begin
CXBase:=OpenLibrary("commodities.library",37);
if CXBase=Nil then
writeln("Can`t open commodities.library")
else begin
BList:=ptr(AllocVec(SizeOf(List),MEMF_PUBLIC));
if BList=Nil then
writeln("No memory for brokerlist")
else begin
NewList(BList);
ok:=CopyBrokerList(BList);
CNode:=BList^.lh_Head;
repeat
HNode:=p_BrokerCopy(ptr(CNode));
BrokerCommand(HNode^.bc_Name,CXCMD_KILL);
CNode:=CNode^.ln_Succ;
until CNode=Nil;
ok:=FreeBrokerList(BList);
FreeVec(BList);
end;
CloseLibrary(CXBase);
end;
end.